<?php
require_once('classes/User.php');

$user = new User;
?>

<h2>User List</h2>
<table border=1> 
        <tr>
                <th>First Name</th>
                <th>Last Name</th>
                <th>Email</th>
                <th>Gender</th>
            <?php
             
            $ctr = 0;
            $user_rec = $user->getUser();
            
            if($user_rec != 0){
                for($x=0;$x<count($user_rec);$x++){
                    echo "<tr>";
                        echo "<td>".$user_rec[$x]['user_lname']."</td>";
                        echo "<td>".$user_rec[$x]['user_fname']."</td>";
                        echo "<td>".$user_rec[$x]['user_email']."</td>";
                        echo "<td>".$user_rec[$x]['user_gender']."</td>";
                        
                    echo "</tr>";
                    $ctr+=1;
                }
            }
            
            ?>  
        </tr>
</table>
<td> <a href="Register.php">Click here to register</a> </td>